<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateShopOrderTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('shop_order', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('uid')->unsigned();
            $table->string('address');
            $table->string('orderNumber');
            $table->string('shopTime')->nullable();
            $table->integer('storeID')->unsigned();
            $table->text('orderList');
            $table->double('amount', 10, 2);
            $table->tinyInteger('payState')->unsigned();
            $table->tinyInteger('logisticsState')->unsigned();
            $table->text('remark')->nullable();
            $table->softDeletes();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('shop_order');
    }
}
